% @brief    对图像进行MASK
% @param    Fig 两帧
% @param    Area 区域[x_min x_max y_min y_max]
% @param    T 阈值
% @output   Fig MASK处理后的图像
function [Fig, MASK] = fun_mask(mask_filepath, Fig, Area, T)
    mask_fig = imread(mask_filepath);
    mask_fig = mask_fig(Area(1):Area(2),Area(3):Area(4));
    [fig_row, fig_col] = size(mask_fig);
    MASK = nan(fig_row,fig_col);
    MASK(mask_fig > T) = 1;
    figure();imshow(MASK);title('Mask图像');
    for f = 1:length(Fig)
        Fig{f,1} = Fig{f,1}(Area(1):Area(2),Area(3):Area(4));
        Fig{f,1} = Fig{f,1}.*MASK;
    end
end